package com.sfh.controller.rsp;

import java.util.Date;

import com.sfh.service.model.MessageModel;

public class RspMessage {
	long messageId;
	// 创建时间
	Date msgCreateTime;
	// 内容
	String msgContent;
	// 话题ID
	long noteId;
	// 创建者ID
	long userId;
	RspUser user;

	public static RspMessage createMessage(MessageModel model) {
		RspMessage message = new RspMessage();
		message.messageId = model.getId();
		message.msgCreateTime = model.getTime();
		message.msgContent = model.getContent();
		message.noteId = model.getNoteId();
		message.userId = model.getUserId();
		
		message.user = RspUser.createRspUser(model.getExtUser());
		
		return message;
	}
}
